<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
    <title>钩子函数参数</title>

</head>

<body>
    <div id="box" v-demo:hello.a.b="message">
    </div>
    <script>
        Vue.directive('demo', {
            bind: function(el, binding, vnode) {
                el.innerHTML = 'name:' + binding.name +
                    '<br>' + 'value:' + binding.value +
                    '<br>' + 'expression:' + binding.expression + '<br>' +
                    'argument:' + binding.arg + '<br>' +
                    'modifiers:' + JSON.stringify(binding.modifiers) + '<br>' +
                    'vnode keys:' + Object.keys(vnode).join(', ')
            }
        });
        new Vue({
            el: '#box',
            data: {
                message: '欢迎来到明日学院'
            }
        })
    </script>
</body>

</html>